@extends('layouts.layout')

@section('title', '创建权限')

@section('content')

    <div class="row">
        <div class="col-md-5">
            <h3>创建权限</h3>
        </div>
        <div class="col-md-7 page-action text-right">
            <a href="{{ route('permissions.index') }}" class="btn btn-default btn-sm"> <i class="fa fa-arrow-left"></i> 返回</a>
        </div>
    </div>


    <style>
        .table td, .table th{ vertical-align:baseline; }
    </style>
    <div class="row clearfix">
        <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="card">
                <div class="body table-responsive">
                    <div class="wrapper wrapper-content animated fadeInRight" style="margin-top: 10px;">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-content">
                                        {!! Form::open(['route' => ['permissions.store'] ]) !!}
                                        <div class="form-group @if ($errors->has('name')) has-error @endif">
                                            {!! Form::label('name', '权限名') !!}
                                            {!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => '权限名']) !!}
                                            @if ($errors->has('name')) <p class="help-block">{{ $errors->first('name') }}</p> @endif
                                        </div>
                                        <div class="form-group @if ($errors->has('description')) has-error @endif">
                                            {!! Form::label('description', '描述') !!}
                                            {!! Form::text('description', null, ['class' => 'form-control', 'placeholder' => '描述']) !!}
                                            @if ($errors->has('description')) <p class="help-block">{{ $errors->first('description') }}</p> @endif
                                        </div>
                                        <!-- Submit Form Button -->
                                        {!! Form::submit('新增权限', ['class' => 'btn btn-primary']) !!}
                                        {!! Form::close() !!}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
